package com.zhong.gang.pda.ui.action;

import android.content.Context;

import com.zhong.gang.applib.http.callback.Callback;
import com.zhong.gang.pda.api.Api;
import com.zhong.gang.pda.api.HttpUtils;

import java.io.File;

public class HuoPersenter {

    public final void getDetailData(Context context,int id, Callback callback){
        HttpUtils.get(Api.getOrderDetail,context)
                .addParams("id",id +"")
                .build().execute(callback);
    }

    protected final void upImg(Context context, File file, Callback callback){
        HttpUtils.post(Api.upImg,context)
                .addFile("file",file.getName(),file)
                .build().execute(context,"上传图片",callback);
    }

}
